package cn.ad.model;

import cn.ad.enumration.AdFormat;
import cn.ad.enumration.AdSpaceStatus;
import cn.ad.enumration.OsType;
import org.apache.ibatis.type.Alias;

/**
 * Created by Administrator on 2016/7/13.
 */
@Alias("adSpaceInfoModel")
public class AdSpaceInfoModel {

    /**
     * 广告位ID
     */
    private int id;
    /**
     * 广告位名称
     */
    private String name;
    /**
     * 广告位形式标识
     */
    private int formatId;
    /**
     * 广告位形式名称
     */
    private String formatName;

    private Integer templateId;

    /**
     * 广告位比例标识
     */
    private int ratioId;
    /**
     * 广告位比例名称
     */
    private String ratioValue;

    /**
     * 媒体标识符
     */
    private int pubSiteId;
    /**
     * 广告位所属平台标识
     */
    private int os;
    /**
     * 广告位所属平台名称(0:未知,1:Android,2:IOS,3:Windows)
     */
    private String osName;
    /**
     * 广告位状态标识
     */
    private int status;
    /**
     * 广告位状态名称
     */
    private String statusName;

    /**
     * 广告位描述
     */
    private String description;
    /**
     * 广告位交互
     */
    private String interactions;
    /**
     * 广告位所支持的素材格式
     */
    private String materialFormat;
    /**
     * 广告位默认创意ID
     */
    private int defaultCreativeId;

    /**
     * 描述广告位默认创意是否存在 0 无创意
     */
    private int defaultCreativeOption;

    /**
     * 广告位售卖方式
     */
    private int buyType;
    /**
     * 广告位计费方式
     */
    private int chargeType;
    /**
     * 刊例价
     */
    private double chargePrice;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getFormatId() {
        return formatId;
    }

    public void setFormatId(int formatId) {
        this.formatId = formatId;
    }

    public String getFormatName() {
        return AdFormat.forValue(formatId);
    }

    public void setFormatName(String formatName) {
        this.formatName = formatName;
    }

    public int getRatioId() {
        return ratioId;
    }

    public void setRatioId(int ratioId) {
        this.ratioId = ratioId;
    }

    public String getRatioValue() {
        return ratioValue;
    }

    public void setRatioValue(String ratioValue) {
        this.ratioValue = ratioValue;
    }

    public int getOs() {
        return os;
    }

    public void setOs(int os) {
        this.os = os;
    }

    public String getOsName() {
        return OsType.forValue(os);
    }

    public void setOsName(String osName) {
        this.osName = osName;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStatusName() {
        return AdSpaceStatus.forValue(status);
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getInteractions() {
        return interactions;
    }

    public void setInteractions(String interactions) {
        this.interactions = interactions;
    }

    public String getMaterialFormat() {
        return materialFormat;
    }

    public void setMaterialFormat(String materialFormat) {
        this.materialFormat = materialFormat;
    }

    public int getDefaultCreativeId() {
        return defaultCreativeId;
    }

    public void setDefaultCreativeId(int defaultCreativeId) {
        this.defaultCreativeId = defaultCreativeId;
    }

    public int getBuyType() {
        return buyType;
    }

    public void setBuyType(int buyType) {
        this.buyType = buyType;
    }

    public int getChargeType() {
        return chargeType;
    }

    public void setChargeType(int chargeType) {
        this.chargeType = chargeType;
    }

    public double getChargePrice() {
        return chargePrice;
    }

    public void setChargePrice(double chargePrice) {
        this.chargePrice = chargePrice;
    }

    public int getDefaultCreativeOption() {
		return defaultCreativeOption;
	}

	public void setDefaultCreativeOption(int defaultCreativeOption) {
		this.defaultCreativeOption = defaultCreativeOption;
	}

	public int getPubSiteId() {
        return pubSiteId;
    }

    public void setPubSiteId(int pubSiteId) {
        this.pubSiteId = pubSiteId;
    }

    public Integer getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Integer templateId) {
        this.templateId = templateId;
    }

    @Override
    public String toString() {
        return "AdSpaceInfoModel{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", formatId=" + formatId +
                ", formatName='" + getFormatName() + '\'' +
                ", ratioId=" + ratioId +
                ", ratioValue='" + ratioValue + '\'' +
                ", os=" + os +
                ", osName='" + getOsName() + '\'' +
                ", status=" + status +
                ", statusName='" + getStatusName() + '\'' +
                ", description='" + description + '\'' +
                ", interactions='" + interactions + '\'' +
                ", materialFormat='" + materialFormat + '\'' +
                ", defaultCreativeId=" + defaultCreativeId +
                ", buyType=" + buyType +
                ", chargeType=" + chargeType +
                ", chargePrice=" + chargePrice +
                ", pubSiteId="+pubSiteId+
                '}';
    }
}
